<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>
    <link rel="stylesheet" href="../plugins/elementui/index.css"/>
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>

</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="date">
            <label>开始时间</label>
            <i class="icon-date" class="startTime"></i>
            <input v-model="startTime" type="text" class="startTime" readonly>
        </div>
        <div class="date">
            <label>结束时间</label>
            <i class="icon-date" class="endTime"></i>
            <input v-model="endTime" type="text" class="endTime" readonly>
        </div>

        <input style="font-size: x-small;" @click="findByPage()" type="button" value="查询">
        <br/>
    </div>

    <div class="contentBox">
        <div class="list-column1">
            <ul class="list">
                <li class="list-item" v-for="setmeal in setmealList">
                    <a class="link-page" :href="'order_detail.html?id='+setmeal.id">
                        <img class="img-object f-left" src="http://health.zlf520.cn/b66ddcbb-3ebf-4cc1-a678-62282cfe4ff1.jpg" />
                        <div class="item-body">
                            <h4 class="ellipsis item-title">体检人 : {{setmeal.name}}</h4>
                            <h4 class="ellipsis item-title">体检套餐 : {{setmeal.setmealName}}</h4>
                            <h4 class="">点击查看预约详情</h4>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<script src="../plugins/elementui/index.js"></script>
<!--<script src="../js/page-health-order.js"></script>-->
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            setmealList: [],
            startTime: "",
            endTime: ""
        },
        created: function (){
            axios.get("/order/findOrder").then((res)=>{
                if (res.data.flag){
                    this.setmealList=res.data.data;
                }
            })
        },
        methods: {
            findByPage() {
                var params = {
                    startTime:this.startTime,
                    endTime:this.endTime
                }
                axios.get("/order/findOrderByTime",{params: params}).then((res)=>{
                    if (res.data.flag){
                        this.setmealList=res.data.data;
                    }
                })
            }
        }
    });
</script>
<script>
    //日期控件
    var startTime = new datePicker();
    startTime.init({
        'trigger': '.startTime',/*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        'minDate': getSpecifiedDate(new Date(), 1),/*最小日期*/
        'maxDate': getSpecifiedDate(new Date(), 30),/*最大日期*/
    });

    var endTime = new datePicker();
    endTime.init({
        'trigger': '.endTime',/*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        'minDate': getSpecifiedDate(new Date(), 1),/*最小日期*/
        'maxDate': getSpecifiedDate(new Date(), 30),/*最大日期*/
    });
</script>
</body>
</html>